import { reactive } from 'vue'
export const myRules = reactive({
  typeName: [
    {
      required: true,
      message: '请输入种类名称',
      trigger: 'change',
    },
    {
      max: 10, message: "种类名称长度不能大于10", trigger: "change",
    },
    {
      max: 10, message: "种类名称长度不能大于10", trigger: "change",
      validator:(rule: any, value: any, callback: any) => {
        if(value) value = value.replace(/\s+/g, '')
        callback()
      }}
  ]
})
